Skip to content

fix: return inspect format errors - #5019

Merged
ChengyuZhu6 merged 1 commit into
containerd:mainfrom
immanuwell:fix-inspect-format-errors
Jun 29, 2026
Merged

ChengyuZhu6 merged 1 commit into
containerd:mainfrom
immanuwell:fix-inspect-format-errors

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

this makes inspect return a real error when the format string is malformed or unsupported. before this, the command logged the formatter error but still exited 0, which is kinda sneaky in scripts.

repro

  1. run nerdctl image inspect -f '{{bad' alpine
  2. current main prints the template error but exits 0
  3. this patch makes it exit non zero

the change only touches the final inspect formatting path. normal json output and valid templates stay the same.

Signed-off-by: immanuwell <pchpr.00@list.ru>
@ChengyuZhu6 ChengyuZhu6 added this to the v2.3.4 milestone Jun 29, 2026

@ChengyuZhu6 ChengyuZhu6 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ChengyuZhu6
ChengyuZhu6 merged commit 9152506 into containerd:main Jun 29, 2026
62 of 69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants